import './index.css'

/* 通用Icon选择器 */
export default function IconListComponent({ iconOptions, icon, setIcon }) {
  return (
    <div className="haihe-c-icon-list gap-2">
      {iconOptions.map(({ value }) => {
        return (
          <div
            className="haihe-c-icon-box"
            onClick={() => {
              setIcon(value)
            }}
          >
            <img src={value} alt="icon" className="haihe-c-icon" />
            <div className={icon === value ? 'haihe-c-icon-box-checked' : ''}></div>
          </div>
        )
      })}
    </div>
  )
}
